package com.controller.front;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


import com.entity.Quser;
import com.service.front.IQuserService;

@Controller
public class QQregisterController {
	
	@Autowired
	private IQuserService qs;
	
	@RequestMapping("/register")
	public String show(){
		return "/qqregister";
	}
	
	
	
	@RequestMapping("/register_submit")
	public String register_submit(String qAccount,Quser quser){
		
		Quser reg = qs.isqAccount(qAccount);
		if(reg==null){
			qs.insert(quser);
			return "login";
		}
		
		return "qqregister";
	}

}
